<%@include file="/WEB-INF/pages/commons/commons.jsp"%>

<fmt:message var="title" key="membership.jsp.title" scope="request"/>
<stripes:layout-render name="${_themePath}/basic-layout-without-navbar.jsp" _title="${title}">

    <stripes:layout-component name="_head">
        <script type="text/javascript">
            $(document).ready(function() {
                $("#s").click(function() {
                    var form = this.form;
                    var params = $(form).serializeArray();
                    params.push({name:'blog', value:'<c:out value="${actionBean.blog.id}"/>'})
                    $.post(
                        '<stripes:url beanclass="foo.bar.blog.web.action.registered.BlogsProfileActionBean" event="membershipSearch"/>',
                        params,
                        function(data) {
                            $("#nonMembershipTableDiv").html(data);    
                        }
                    );
                });
            });
        </script>
    </stripes:layout-component>


    <stripes:layout-component name="_topNav">
            <H1>Blogs Profile</H1>
            <UL class="gc-topnav-tabs">
                <LI>&nbsp;</LI>
            </UL>
        </stripes:layout-component>


    <stripes:layout-component name="_content">
        <h2>Edit Membership</h2>
        <div id="searchDiv">
            <stripes:form beanclass="foo.bar.blog.web.action.registered.BlogsProfileActionBean" >
            <table width="100%">
                <tr>
                    <td><stripes:label name="search"/></td>
                    <td>
                        <stripes:text name="search"/>
                        <stripes:button id="s" name="membershipSearch"/>
                    </td>
                </tr>
            </table>
            </stripes:form>
        </div>
        <p/>
        <p/>

        <h2>Non Members</h2>
        <div id="nonMembershipTableDiv">
            <%@include file="non_membership_table.jsp"%>
        </div>
        <p/>
        <p/>

        <h2>Members</h2>
        <div id="membersTableDiv">
            <%@include file="membership_table.jsp"%>
        </div>


    </stripes:layout-component>
</stripes:layout-render>

